﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

public enum Direction
{
    None,
    Left,
    Right,
    Up,
    Down
}

public static class Globals
{
    public static bool IsPaused = false;

    public static bool CheckingMap = false;

    public static double CollisionHeight = 0.5;

    public static double CollisionWidth = 0.5;

    private static Random Random = new Random();

    private static double lastDouble = 0;

    private static bool mute = false;

    public static int ScreenWidth = 1280;
    public static int ScreenHeight = 720;

    public static int ScreenWidth2 = ScreenWidth / 2;
    public static int ScreenHeight2 = ScreenHeight / 2;

    public static bool Mute
    {
        get { return mute; }
        set
        {
            mute = value;

            if (mute)
                AudioManager.StopMusic();
            else
                AudioManager.ContinueMusic();
        }
    }

    private static bool fullScreen = false;

    public static bool FullScreen
    {
        get { return fullScreen; }
        set
        {
            ScreenManager.Graphics.ToggleFullScreen();
            fullScreen = value;
        }
    }

    public static double GetRandomDouble
    {
        get 
        {
            double aux = Random.NextDouble();
            if (aux == lastDouble)
            {
                Random = new Random((int)DateTime.Now.Ticks);
                lastDouble = Random.NextDouble();
                return lastDouble;
            }
            return aux;
        } 
    }

    private static SpriteFont font;
    public static SpriteFont Font
    {
        get 
        {
            if (font == null)
                font = GameSession.Content.Load<SpriteFont>("SpriteFont1");
            return font;
        }
        set { font = value; }
    }

    private static bool firstThought = true;
    private static bool firstDialog = true;
    private static bool firstItem = true;
    private static bool firstMove = true;
    private static bool firsttime = true;
    public static bool FirstDialog
    {
        get { return firstDialog; }
        set { firstDialog = value; }
    }
    public static bool FirstThought
    {
        get { return firstThought; }
        set { firstThought = value; }
    }
    public static bool FirstItem
    {
        get { return firstItem; }
        set { firstItem = value; }
    }
    public static bool FirstMove
    {
        get { return firstMove; }
        set { firstMove = value; }
    }
    public static bool FirstTime
    {
        get { return firsttime; }
        set { firsttime = value; }
    }
}

